/******************************************************************************/
/******************************************************************************/
/******************************************************************************/



* Start timer for debugging
etime, start

cls
eststo clear
timer clear 1
timer on 1


*sysdir set PLUS "SET LOCATION OF ADO FILES HERE"
sysdir set PLUS "C:\Local Data\Replication v2\Ado"

* Sets local data location.
* CHANGE THIS TO MATCH USER'S ROOT FOLDER
*global LocalData "SET ROOT FOLDER HERE"
global LocalData "C:\Local Data\Replication v2"


capture mkdir "$LocalData\SourceData\"
global SourceData "$LocalData\SourceData"
cd "$LocalData"

* Creates Archive folder, if one does not already exist
capture mkdir "$LocalData\Archive\"

* Creates Results folder, if one does not already exist
capture mkdir "$LocalData\Results\"


* Creates Results folder, if one does not already exist
capture mkdir "$LocalData\Tables\"

* Creates a label for today's date
local CurrentDate : display %tdDNCY daily("$S_DATE", "DMY")

*Creating Analytical Data Sets
do CountyYearFirmSizes.do
do NationalIndustryFirmGrowth2digit.do
	*Includes Figure 2 output
do Demographic.do
do merger_data.do
do CPI.do
do CountyBanking.do
do CountyIndustryEmp_2digit.do
do Cluster3.do
do BartikAnalysis.do
do BankLevelAnalysis.do
do CRA.do
do BartikAnalysis_3digit.do

exit
*Tables*
*Adao Standard Errors are produced as part of separate tables and not automatically output into the regression tables as they appear in the paper.
do Table1.do
do Table2.do
do Table3.do
do Table4.do
*GSS_2digit makes multiple tables
do GSS_2digit.do
	*Includes Figure 4 and Figure 5
	*Includes Table 5
*GSS_3digit only partial output is used
do Mining.do
	*Table 6
do Balance.do
	*Table 7
do BankDeposits.do
	*Table 8
do BankRegs.do
	*Table 9 & 11
do TableMerger.do
	*Table 10
do CRARegs.do
	*Table 12
do Spillover.do
	*Table 13
	
*Appendix Tables
do GSS_3digit.do
do FiveYear.do

*Additional Figures
do Figure1.do
do Figures3_7.do
	*Figure 3 & 7
do Maps.do
	*Figure 6


